<%--
 *  File:    UploadSummaryOrganizationDT.jsp	
 *  @Author: wangmin 
 *  Date:    2012/07/31
 *
 *  Copyright (C) 2000 - 2008 Oval Technologies, Inc.
 *  All rights reserved. 
 *
 *  This software is the confidential and proprietary information of Oval 
 *  Technologies, Inc. ("Confidential Information").  You shall not
 *  disclose such Confidential Information and shall use it only in
 *  accordance with the terms of the license agreement you entered into
 *  with Oval.
--%>

<%@ page contentType = "text/html;charset=UTF-8" %>
<%@ taglib uri="/WEB-INF/PageFlow.tld" prefix="PageFlow" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
<%@ taglib uri="/WEB-INF/oval-tag.tld" prefix="oval" %>
<%@ taglib uri="/WEB-INF/custom.tld" prefix="custom" %>

<%
  //init param
  String privilegeCode = "11302";
  String strTableName = "";
  String strModuleName = "PCM";
  String contextPath = request.getContextPath();
%>
<%@ include file="/inc/CommonHeader.inc" %>
<%@ include file="/inc/OvalLocationDefault.inc" %>
<%@ include file="/rpt/ReportURL.inc"%>

<html>
<head>
<title>UploadSummaryOrganizationDT</title>
<PageFlow:CheckPageFlow pageName="p_temporg112"/>
<%@ include file="/inc/CatchError.inc" %>
<%
Vector totalsummary = (Vector)pageContext.getAttribute("totalsummary");
Vector provector = (Vector)pageContext.getAttribute("provector");
if(totalsummary == null) totalsummary = new Vector();
if(provector == null) provector = new Vector();
String allflag = (String)pageContext.getAttribute("allflag");
HashMap UserInfo = (HashMap)session.getAttribute("userinfo");
if(UserInfo == null) UserInfo = new HashMap();

HashMap prohash=new HashMap();
for(int j=0;j<provector.size();j++){
	  prohash.put(((HashMap)provector.get(j)).get("numcode"),((HashMap)provector.get(j)).get("productgroupname"));
};
%>
<link rel="stylesheet" href="<%=contextPath%>/css/<%= strLanguageCode %>/main.css" type="text/css">
<script language="JavaScript" src="<%=contextPath%>/css/cn/script.js"></script>
<script language="JavaScript" src="<%=contextPath%>/js/ScriptLib.js"></script>
<script language="JavaScript" src="<%=contextPath%>/js/FuncLib.js"></script>
<%@ include file="/inc/SummaryDivision.inc" %>

<script language="JavaScript">
<%--  put your custom script here   --%>
function page_summary(actionvalue,orderbyname)
{
  var editform = summaryPrepare(cform,actionvalue,orderbyname);
  if(!editform) return;
  editform.action = "UploadSummaryOrganizationDT.jsp?<%= OvalTools.randomURL() %>";
  editform.target = "_self";
  isRunning = true;
  editform.submit();
}

function page_check()
{    

    cform.actionname.value = "check";
    cform.target = "_self";
    isRunning = true;
    cform.submit();
}

function page_confirm(){
 /*   if(nullChecked(document.cform.uploadorgids))
        {
          alert("<%= message.getMessageDesc("PLEASE_SELECT") %>");
          return;
        }*/
	cform.actionname.value = "confirm";
    cform.target = "_self";
    isRunning = true;
    cform.submit();
}
function page_refuse(){
    if(nullChecked(document.cform.uploadorgids))
        {
          alert("<%= message.getMessageDesc("PLEASE_SELECT") %>");
          return;
        }
	cform.actionname.value = "refuse";
    cform.target = "_self";
    isRunning = true;
    cform.submit();
}
function page_agree(){
    if(nullChecked(document.cform.uploadorgids))
        {

          alert("<%= message.getMessageDesc("PLEASE_SELECT") %>");
          return;
        }
	cform.actionname.value = "agree";
    cform.target = "_self";
    isRunning = true;
    cform.submit();
}
function page_approval(){

    if(nullChecked(document.cform.uploadorgids))
        {
          alert("<%= message.getMessageDesc("PLEASE_SELECT") %>");
          return;
        }
	cform.actionname.value = "approval";
    cform.target = "_self";
    isRunning = true;
    cform.submit();
}

function page_giveup(){
	var flag1 = confirm("<%= message.getMessageDesc("SURE_GIVE_UP")%>");
	if(!flag1){
		return;
	}
	cform.actionname.value = "giveup";
    cform.target = "_self";
    isRunning = true;
    cform.submit();
}	

function page_operate(operand)
{
	if(cform.filename.value === "" || cform.filename.value === null){
		return false;
	}
		  if (operand=="upload")
		  {
		    cform.encoding="multipart/form-data";
		    cform.actionname.value = "upload";
		    cform.target = "_self";
		    cform.submit();
		  }
	  
}
function page_print(){
    //preview
    var url1 = "<%=reportURL%>/servlet/ExcecuteReport/temp_uploaddterrormessage.sox?__format=xlsx&__folder=/ovalreport&employeeid="+document.cform.userid.value +"&globalpccode="+document.cform.globalpccode.value;
	//var strstatus="height=768, width=1024,top=0,left=0,toolbar=no, menubar=no, scrollbars=yes, resizable=yes, location=no, status=no";
    //popwindow = window.open(url1, "n1window", strstatus);	
    DataReport(url1);
}

function allcheckselect(){
	var allcheck = cform.allcheck.checked;
	var uploadorgids = document.getElementsByName('uploadorgids');
	var length = uploadorgids.length;
	if(allcheck){
		for(var i = 0 ; i < length;i++){
		if(!uploadorgids[i].disabled)
			uploadorgids[i].checked = true;
		}
	}else{
		for(var i = 0 ; i < length;i++){
			uploadorgids[i].checked = false;
		}	
	}
}


function page_confirm1(){
	 /*   if(nullChecked(document.cform.uploadorgids))
	        {
	          alert("<%= message.getMessageDesc("PLEASE_SELECT") %>");
	          return;
	        }*/
		cform.actionname.value = "confirm1";
	    cform.target = "_self";
	    isRunning = true;
	    cform.submit();
	}
function page_submit(){
	
		cform.actionname.value = "submit";
	    cform.target = "_self";
	    isRunning = true;
	    cform.submit();
	}

</script>
</head>

<body style="overflow: auto;">
<form name="cform" method="post" action="<%=contextPath%>/Dispatcher">
    <input type="hidden" name="pagename" value="p_temporg112">
    <input type="hidden" name="actionname">
    <input type="hidden" name="name">
    <input type="hidden" name="type">
    <input type="hidden" name="sheetname" value="dtinfo">
    <input type="hidden" name="begioncolumn" value="32">
    <input type="hidden" name="endcolumn" value="111">
    <input type="hidden" name="standardnum" value="4">
     <input type="hidden" name="subjectcode" value="802">
    <input type="hidden" name="flag" value="distributor">
    <input type="hidden" name="globalpccode" value="112">
    <input type="hidden" name="codeinsheet" value = "Y"/>
    <input type="hidden"
	name="__header__Content-disposition" id="outname"
	value="attachment;filename=DistributorMasterData.xls" />
	<custom:hidden scope="session" name="userinfo" property="userid"></custom:hidden>

<%--  page location   --%>
    <%@ include file="/inc/PageLocation.inc" %>

    <table width="100%" cellspacing="0" border="0" cellpadding="0">
      <tr>
<%--  search criteria  --%>
      </tr>
      <tr>
        <td>
          <table width="100%" border="0" cellspacing="0">
             <tr>
			  <td> 
			  	<%= label.getLabelName("L_Path") %><%= label.getLabelName("L_Colon") %><input type="file" name="filename" size="30" >
			    &nbsp;&nbsp;&nbsp;&nbsp;<a onclick="page_operate('upload')"><custom:button type="1" label="L_Finish" imgsrc="finish.gif" border="0" style="width:60"/></a>
			    
			  </td>
			 </tr>
          </table>
        </td>
      </tr>
      <tr>
        <td>
<div style="overflow:auto;width:1320;height:400">
          <table width="10000"  border="1" cellpadding="0" bordercolorlight="#999999" bordercolordark="#FFFFFF" cellspacing="0" align="center">
            <tr class="deepblue-left">
<!--              <td class="title_center" rowspan="2" width="1%">&nbsp;<input type="checkbox" name="allcheck" class="normalradio" onclick="allcheckselect();"></td>-->
<!--              <td class="title_center" rowspan="2" nowrap="nowrap"><a href="javascript:page_summary('orderby','approvalstatus')"><%= label.getLabelName("L_ApprovalStatus") %></td>-->
              <td class="title_center" rowspan="2" nowrap="nowrap"><%= label.getLabelName("L_OrgCode") %></td>
              <td class="title_center" rowspan="2" nowrap="nowrap"><%= label.getLabelName("L_YlCode") %></td>
              <td class="title_center" rowspan="2" width="3%"><%= label.getLabelName("L_OrgName") %></td>
              <td class="title_center" rowspan="2" nowrap="nowrap"><%= label.getLabelName("L_StatusName") %></td>
              <td class="title_center" rowspan="2" width="1%"><%= label.getLabelName("L_Province") %></td>
              <td class="title_center" rowspan="2" width="1%"><%= label.getLabelName("L_YLCounty") %></td>
              <td class="title_center" rowspan="2" width="4%"><%= label.getLabelName("L_RegisteredAddress") %></td>
              <td class="title_center" rowspan="2" width="1%"><%= label.getLabelName("L_Zip") %></td>
              <td class="title_center" rowspan="2" width="1%"><%= label.getLabelName("L_Telephone") %></td>
              <td class="title_center" rowspan="2" width="1%"><%= label.getLabelName("L_Fax") %></td>
              <td class="title_center" rowspan="2" width="1%"><%= label.getLabelName("L_Comments") %></td>
              
              <td class="title_center" rowspan="2" nowrap="nowrap"><%= label.getLabelName("L_Biznature") %></td>
              <td class="title_center" rowspan="2" nowrap="nowrap"><%= label.getLabelName("L_PuYaoSalesModel") %></td>
              <td class="title_center" rowspan="2" nowrap="nowrap"><%= label.getLabelName("L_EMPHASISBUSINESS") %></td>
			  <td class="title_center" rowspan="2" nowrap="nowrap"><%= label.getLabelName("L_ISCHAIN") %></td>          
              <td class="title_center" rowspan="2" nowrap="nowrap"><%= label.getLabelName("L_ParentOrg") %><%= label.getLabelName("L_Code") %></td>
              <td class="title_center" rowspan="2" width="4%"><%= label.getLabelName("L_ParentOrg") %><%= label.getLabelName("L_Name") %></td>
              <td class="title_center" rowspan="2" width="2%"><%= label.getLabelName("L_ChainHeadquarterType") %></td>
              <td class="title_center" rowspan="2" nowrap="nowrap"><%= label.getLabelName("L_countyorgcode") %><%= label.getLabelName("L_Code") %></td>
              <td class="title_center" rowspan="2" width="4%"><%= label.getLabelName("L_countyorgcode") %><%= label.getLabelName("L_Name") %></td>
              <td class="title_center" rowspan="2" nowrap="nowrap"><%= label.getLabelName("L_BaseDrugBuInfo") %></td>
              
              <td class="title_center" rowspan="2" nowrap="nowrap"><%= label.getLabelName("L_CommercialSalesType") %></td>
              <td class="title_center" rowspan="2" nowrap="nowrap"><%= label.getLabelName("L_PatentMedicineProtocolType") %></td>
              <td class="title_center" rowspan="2" nowrap="nowrap"><%= label.getLabelName("L_Genericprotocoltype") %></td>
              <td class="title_center" rowspan="2" nowrap="nowrap"><%= label.getLabelName("L_IsBindingogenericdrugs") %></td>
              <!-- 
              <td class="title_center" rowspan="2" nowrap="nowrap"><%= label.getLabelName("L_BusinessLicenseNo") %></td>
              <td class="title_center" rowspan="2" nowrap="nowrap"><%= label.getLabelName("L_Org") %><%= label.getLabelName("L_Taxnumber") %></td>
              <td class="title_center" rowspan="2" nowrap="nowrap"><%= label.getLabelName("L_BankName") %></td>
              <td class="title_center" rowspan="2" nowrap="nowrap"><%= label.getLabelName("L_BankAccount") %></td>
               -->
              <td class="title_center" rowspan="2" nowrap="nowrap"><%= label.getLabelName("L_Consigneraddr") %></td>
              <td class="title_center" rowspan="2" nowrap="nowrap"><%= label.getLabelName("L_QuickCode") %></td>
              
			  <td class="title_center" rowspan="2" nowrap="nowrap"><%= label.getLabelName("L_ExInfo") %>1</td>
			  <td class="title_center" rowspan="2" nowrap="nowrap"><%= label.getLabelName("L_ExInfo") %>2</td>
			  <td class="title_center" rowspan="2" nowrap="nowrap"><%= label.getLabelName("L_ExInfo") %>3</td>
			  <td class="title_center" rowspan="2" nowrap="nowrap"><%= label.getLabelName("L_ExInfo") %>4</td>
			  <td class="title_center" rowspan="2" wnowrap="nowrap"><%= label.getLabelName("L_ExInfo") %>5</td>
			  <!--
			  <td class="title_center" colspan="3"><%= label.getLabelName("L_Product")+label.getLabelName("L_GroupNo") %>1</td>	
              <td class="title_center" colspan="3"><%= label.getLabelName("L_Product")+label.getLabelName("L_GroupNo") %>2</td>
              <td class="title_center" colspan="3"><%= label.getLabelName("L_Product")+label.getLabelName("L_GroupNo") %>3</td>
              <td class="title_center" colspan="3"><%= label.getLabelName("L_Product")+label.getLabelName("L_GroupNo") %>4</td>
              <td class="title_center" colspan="3"><%= label.getLabelName("L_Product")+label.getLabelName("L_GroupNo") %>5</td>
              <td class="title_center" colspan="3"><%= label.getLabelName("L_Product")+label.getLabelName("L_GroupNo") %>6</td>
              <td class="title_center" colspan="3"><%= label.getLabelName("L_Product")+label.getLabelName("L_GroupNo") %>7</td>
              <td class="title_center" colspan="3"><%= label.getLabelName("L_Product")+label.getLabelName("L_GroupNo") %>8</td>
              <td class="title_center" colspan="3"><%= label.getLabelName("L_Product")+label.getLabelName("L_GroupNo") %>9</td>
              <td class="title_center" colspan="3"><%= label.getLabelName("L_Product")+label.getLabelName("L_GroupNo") %>10</td>			  
              -->
              <td class="title_center" colspan="4"><%=prohash.get("productgroupid1")== null ? label.getLabelName("L_Product")+label.getLabelName("L_GroupNo")+1 : prohash.get("productgroupid1")%>&nbsp;</td>
                <td class="title_center" colspan="4"><%=prohash.get("productgroupid2")== null ? label.getLabelName("L_Product")+label.getLabelName("L_GroupNo")+2 : prohash.get("productgroupid2")%>&nbsp;</td>
                <td class="title_center" colspan="4"><%=prohash.get("productgroupid3")== null ? label.getLabelName("L_Product")+label.getLabelName("L_GroupNo")+3 : prohash.get("productgroupid3")%>&nbsp;</td>
                <td class="title_center" colspan="4"><%=prohash.get("productgroupid4")== null ? label.getLabelName("L_Product")+label.getLabelName("L_GroupNo")+4 : prohash.get("productgroupid4")%>&nbsp;</td>
                <td class="title_center" colspan="4"><%=prohash.get("productgroupid5")== null ? label.getLabelName("L_Product")+label.getLabelName("L_GroupNo")+5 : prohash.get("productgroupid5")%>&nbsp;</td>
                <td class="title_center" colspan="4"><%=prohash.get("productgroupid6")== null ? label.getLabelName("L_Product")+label.getLabelName("L_GroupNo")+6 : prohash.get("productgroupid6")%>&nbsp;</td>
                <td class="title_center" colspan="4"><%=prohash.get("productgroupid7")== null ? label.getLabelName("L_Product")+label.getLabelName("L_GroupNo")+7 : prohash.get("productgroupid7")%>&nbsp;</td>
                <td class="title_center" colspan="4"><%=prohash.get("productgroupid8")== null ? label.getLabelName("L_Product")+label.getLabelName("L_GroupNo")+8 : prohash.get("productgroupid8")%>&nbsp;</td>
                <td class="title_center" colspan="4"><%=prohash.get("productgroupid9")== null ? label.getLabelName("L_Product")+label.getLabelName("L_GroupNo")+9 : prohash.get("productgroupid9")%>&nbsp;</td>
                <td class="title_center" colspan="4"><%=prohash.get("productgroupid10")== null ? label.getLabelName("L_Product")+label.getLabelName("L_GroupNo")+10 : prohash.get("productgroupid10")%>&nbsp;</td>
              
              <td class="title_center" colspan="4"><%=prohash.get("productgroupid11")== null ? label.getLabelName("L_Product")+label.getLabelName("L_GroupNo")+11 : prohash.get("productgroupid11")%>&nbsp;</td>
                <td class="title_center" colspan="4"><%=prohash.get("productgroupid12")== null ? label.getLabelName("L_Product")+label.getLabelName("L_GroupNo")+12 : prohash.get("productgroupid12")%>&nbsp;</td>
                <td class="title_center" colspan="4"><%=prohash.get("productgroupid13")== null ? label.getLabelName("L_Product")+label.getLabelName("L_GroupNo")+13 : prohash.get("productgroupid13")%>&nbsp;</td>
                <td class="title_center" colspan="4"><%=prohash.get("productgroupid14")== null ? label.getLabelName("L_Product")+label.getLabelName("L_GroupNo")+14 : prohash.get("productgroupid14")%>&nbsp;</td>
                <td class="title_center" colspan="4"><%=prohash.get("productgroupid15")== null ? label.getLabelName("L_Product")+label.getLabelName("L_GroupNo")+15 : prohash.get("productgroupid15")%>&nbsp;</td>
                <td class="title_center" colspan="4"><%=prohash.get("productgroupid16")== null ? label.getLabelName("L_Product")+label.getLabelName("L_GroupNo")+16 : prohash.get("productgroupid16")%>&nbsp;</td>
                <td class="title_center" colspan="4"><%=prohash.get("productgroupid17")== null ? label.getLabelName("L_Product")+label.getLabelName("L_GroupNo")+17 : prohash.get("productgroupid17")%>&nbsp;</td>
                <td class="title_center" colspan="4"><%=prohash.get("productgroupid18")== null ? label.getLabelName("L_Product")+label.getLabelName("L_GroupNo")+18 : prohash.get("productgroupid18")%>&nbsp;</td>
                <td class="title_center" colspan="4"><%=prohash.get("productgroupid19")== null ? label.getLabelName("L_Product")+label.getLabelName("L_GroupNo")+19 : prohash.get("productgroupid19")%>&nbsp;</td>
                <td class="title_center" colspan="4"><%=prohash.get("productgroupid20")== null ? label.getLabelName("L_Product")+label.getLabelName("L_GroupNo")+20 : prohash.get("productgroupid20")%>&nbsp;</td>
             
              
              <td class="title_center" rowspan="2" width="4%"><%= label.getLabelName("L_ErrorMsg") %> </td>
             
            </tr>
            <tr class="deepblue-left">
             <td class="title_center"><%= label.getLabelName("L_BusinessAreaName") %></td>
              <td class="title_center"><%= label.getLabelName("L_SalesRepCode") %></td>
			  <td class="title_center"><%= label.getLabelName("L_SalesRepName") %></td>
              <td class="title_center"><%= label.getLabelName("L_YesOrNoBale") %></td>
              
              <td class="title_center"><%= label.getLabelName("L_BusinessAreaName") %></td>
              <td class="title_center"><%= label.getLabelName("L_SalesRepCode") %></td>
			  <td class="title_center"><%= label.getLabelName("L_SalesRepName") %></td>
			  <td class="title_center"><%= label.getLabelName("L_YesOrNoBale") %></td>
			  
              <td class="title_center"><%= label.getLabelName("L_BusinessAreaName") %></td>
              <td class="title_center"><%= label.getLabelName("L_SalesRepCode") %></td>
			  <td class="title_center"><%= label.getLabelName("L_SalesRepName") %></td>
			  <td class="title_center"><%= label.getLabelName("L_YesOrNoBale") %></td>
			  
              <td class="title_center"><%= label.getLabelName("L_BusinessAreaName") %></td>
              <td class="title_center"><%= label.getLabelName("L_SalesRepCode") %></td>
			  <td class="title_center"><%= label.getLabelName("L_SalesRepName") %></td>
			  <td class="title_center"><%= label.getLabelName("L_YesOrNoBale") %></td>
			  
              <td class="title_center"><%= label.getLabelName("L_BusinessAreaName") %></td>
              <td class="title_center"><%= label.getLabelName("L_SalesRepCode") %></td>
			  <td class="title_center"><%= label.getLabelName("L_SalesRepName") %></td>
			  <td class="title_center"><%= label.getLabelName("L_YesOrNoBale") %></td>
			  
              <td class="title_center"><%= label.getLabelName("L_BusinessAreaName") %></td>
              <td class="title_center"><%= label.getLabelName("L_SalesRepCode") %></td>
			  <td class="title_center"><%= label.getLabelName("L_SalesRepName") %></td>
			  <td class="title_center"><%= label.getLabelName("L_YesOrNoBale") %></td>
			  
              <td class="title_center"><%= label.getLabelName("L_BusinessAreaName") %></td>
              <td class="title_center"><%= label.getLabelName("L_SalesRepCode") %></td>
			  <td class="title_center"><%= label.getLabelName("L_SalesRepName") %></td>
			  <td class="title_center"><%= label.getLabelName("L_YesOrNoBale") %></td>
			  
              <td class="title_center"><%= label.getLabelName("L_BusinessAreaName") %></td>
              <td class="title_center"><%= label.getLabelName("L_SalesRepCode") %></td>
			  <td class="title_center"><%= label.getLabelName("L_SalesRepName") %></td>
			  <td class="title_center"><%= label.getLabelName("L_YesOrNoBale") %></td>
			  
              <td class="title_center"><%= label.getLabelName("L_BusinessAreaName") %></td>
              <td class="title_center"><%= label.getLabelName("L_SalesRepCode") %></td>
			  <td class="title_center"><%= label.getLabelName("L_SalesRepName") %></td>
			  <td class="title_center"><%= label.getLabelName("L_YesOrNoBale") %></td>
			  
              <td class="title_center"><%= label.getLabelName("L_BusinessAreaName") %></td>
              <td class="title_center"><%= label.getLabelName("L_SalesRepCode") %></td>
			  <td class="title_center"><%= label.getLabelName("L_SalesRepName") %></td>
			  <td class="title_center"><%= label.getLabelName("L_YesOrNoBale") %></td>
			  
			  <td class="title_center"><%= label.getLabelName("L_BusinessAreaName") %></td>
              <td class="title_center"><%= label.getLabelName("L_SalesRepCode") %></td>
			  <td class="title_center"><%= label.getLabelName("L_SalesRepName") %></td>
			  <td class="title_center"><%= label.getLabelName("L_YesOrNoBale") %></td>
			  
              <td class="title_center"><%= label.getLabelName("L_BusinessAreaName") %></td>
              <td class="title_center"><%= label.getLabelName("L_SalesRepCode") %></td>
			  <td class="title_center"><%= label.getLabelName("L_SalesRepName") %></td>
			  <td class="title_center"><%= label.getLabelName("L_YesOrNoBale") %></td>
			  
              <td class="title_center"><%= label.getLabelName("L_BusinessAreaName") %></td>
              <td class="title_center"><%= label.getLabelName("L_SalesRepCode") %></td>
			  <td class="title_center"><%= label.getLabelName("L_SalesRepName") %></td>
			  <td class="title_center"><%= label.getLabelName("L_YesOrNoBale") %></td>
			  
              <td class="title_center"><%= label.getLabelName("L_BusinessAreaName") %></td>
              <td class="title_center"><%= label.getLabelName("L_SalesRepCode") %></td>
			  <td class="title_center"><%= label.getLabelName("L_SalesRepName") %></td>
			  <td class="title_center"><%= label.getLabelName("L_YesOrNoBale") %></td>
			  
              <td class="title_center"><%= label.getLabelName("L_BusinessAreaName") %></td>
              <td class="title_center"><%= label.getLabelName("L_SalesRepCode") %></td>
			  <td class="title_center"><%= label.getLabelName("L_SalesRepName") %></td>
			  <td class="title_center"><%= label.getLabelName("L_YesOrNoBale") %></td>
			  
              <td class="title_center"><%= label.getLabelName("L_BusinessAreaName") %></td>
              <td class="title_center"><%= label.getLabelName("L_SalesRepCode") %></td>
			  <td class="title_center"><%= label.getLabelName("L_SalesRepName") %></td>
			  <td class="title_center"><%= label.getLabelName("L_YesOrNoBale") %></td>
			  
              <td class="title_center"><%= label.getLabelName("L_BusinessAreaName") %></td>
              <td class="title_center"><%= label.getLabelName("L_SalesRepCode") %></td>
			  <td class="title_center"><%= label.getLabelName("L_SalesRepName") %></td>
			  <td class="title_center"><%= label.getLabelName("L_YesOrNoBale") %></td>
			  
              <td class="title_center"><%= label.getLabelName("L_BusinessAreaName") %></td>
              <td class="title_center"><%= label.getLabelName("L_SalesRepCode") %></td>
			  <td class="title_center"><%= label.getLabelName("L_SalesRepName") %></td>
			  <td class="title_center"><%= label.getLabelName("L_YesOrNoBale") %></td>
			  
              <td class="title_center"><%= label.getLabelName("L_BusinessAreaName") %></td>
              <td class="title_center"><%= label.getLabelName("L_SalesRepCode") %></td>
			  <td class="title_center"><%= label.getLabelName("L_SalesRepName") %></td>
			  <td class="title_center"><%= label.getLabelName("L_YesOrNoBale") %></td>
			  
              <td class="title_center"><%= label.getLabelName("L_BusinessAreaName") %></td>
              <td class="title_center"><%= label.getLabelName("L_SalesRepCode") %></td>
			  <td class="title_center"><%= label.getLabelName("L_SalesRepName") %></td>
			  <td class="title_center"><%= label.getLabelName("L_YesOrNoBale") %></td>
			  
            </tr>
<%
	int i=0;
	String strClassType="";
	String checkflag = null;
    Integer ApprovalStatus = new Integer(-1); 
    Integer ApprovalUserid = new Integer(-1); 
    

%>
            <%--  the old detail lines  --%>
 <span id="olddetail" >
            <logic:iterate id="onerow" collection="<%= totalsummary %>" indexId="idx" scope="page">
<%
	if(i%2 == 1)
	  {
	    strClassType = "td-listrom";
	  }else{                    
	    strClassType = "none";
	  }
	  i++;
	  
	  HashMap row = (HashMap)pageContext.getAttribute("onerow");
	if(row.get("errormassage") != null){
		strClassType = "need";
		
	}
	checkflag = (String)row.get("ck_flag");
	ApprovalStatus = (Integer)(row.get("approvalstatus"));
	ApprovalUserid = (Integer)(row.get("approvaluserid"));

%>
            <tr onMouseOver="this.className='tr-over'" onMouseOut="this.className='<%=JspHelper.filterNull( strClassType )%>'" class="<%=JspHelper.filterNull( strClassType )%>">
<!--            <td class="title_center">-->
<!--             <custom:checkbox property="temp_uploadorgid" styleClass="checkbox" name="onerow" changedName="uploadorgids"/></td>-->
<!--              <td><custom:write property="approvalstatus" name="onerow" dictType="ApprovalStatus" nbsp="true"/></td>-->
              <td><custom:write property="orgcode" name="onerow"  nbsp="true"/></td>
              <td><custom:write property="yl_orgcode" name="onerow"  nbsp="true"/></td>
              <td><custom:write property="orgname" name="onerow"  nbsp="true"/></td>
              <td><custom:write property="statusname" name="onerow"  nbsp="true"/></td>
              <td><custom:write property="regionname" name="onerow"  nbsp="true"/></td>
              <td><custom:write property="cityname" name="onerow"  nbsp="true"/></td>
              <td><custom:write property="registeraddress" name="onerow"  nbsp="true"/></td>
              <td><custom:write property="zipcode" name="onerow"  nbsp="true"/></td>
              <td><custom:write property="telephone" name="onerow"  nbsp="true"/></td>
              <td><custom:write property="fax" name="onerow"  nbsp="true"/></td>
              
              <td><custom:write property="comments" name="onerow"  nbsp="true"/></td>
              <td><custom:write property="businessproperty" name="onerow"  nbsp="true"/></td>
              <td><custom:write property="salesmodel" name="onerow"  nbsp="true"/></td>
              <td><custom:write property="emphasisbusiness" name="onerow"  nbsp="true"/></td>
              <td><custom:write property="ischain" name="onerow"  nbsp="true"/></td>
              <td><custom:write property="parentorgcode" name="onerow"  nbsp="true"/></td>
              <td><custom:write property="parentorgname" name="onerow"  nbsp="true"/></td>
              <td><custom:write property="orgproperty" name="onerow"  nbsp="true"/></td>
              <td><custom:write property="countyorgcode" name="onerow"  nbsp="true"/></td>
              <td><custom:write property="countyorgname" name="onerow"  nbsp="true"/></td>
              <td><custom:write property="delivery" name="onerow"  nbsp="true"/></td>
             
              
              <td><custom:write property="commercialsales" name="onerow"  nbsp="true"/></td>
              <td><custom:write property="patentmedicineprotocol" name="onerow"  nbsp="true"/></td>
              <td><custom:write property="genericprotocol" name="onerow"  nbsp="true"/></td>
              <td><custom:write property="isbindingogenericdrugs" name="onerow"  nbsp="true"/></td>
               
               <!-- 
              <td><custom:write property="licenceno" name="onerow"  nbsp="true"/></td>
              <td><custom:write property="taxno" name="onerow"  nbsp="true"/></td>
              <td><custom:write property="accountbank" name="onerow"  nbsp="true"/></td>
              <td><custom:write property="accountno" name="onerow"  nbsp="true"/></td>
              -->
              <td><custom:write property="consigneraddr" name="onerow"  nbsp="true"/></td>
              <td><custom:write property="spellcn" name="onerow"  nbsp="true"/></td>
              
              <td><custom:write property="attr101" name="onerow"  nbsp="true"/></td>
              <td><custom:write property="attr102" name="onerow"  nbsp="true"/></td>
              <td><custom:write property="attr103" name="onerow"  nbsp="true"/></td>
              <td><custom:write property="attr104" name="onerow"  nbsp="true"/></td>
              <td><custom:write property="attr105" name="onerow"  nbsp="true"/></td>
              
              <td><custom:write property="area1" name="onerow"  nbsp="true"/></td>
              <td><custom:write property="contactcode1" name="onerow"  nbsp="true"/></td>
              <td><custom:write property="contactname1" name="onerow"  nbsp="true"/></td>
              <td><custom:write property="isbale1" name="onerow"  nbsp="true"/></td>
              
              <td><custom:write property="area2" name="onerow"  nbsp="true"/></td>
              <td><custom:write property="contactcode2" name="onerow"  nbsp="true"/></td>
              <td><custom:write property="contactname2" name="onerow"  nbsp="true"/></td>
              <td><custom:write property="isbale2" name="onerow"  nbsp="true"/></td>
              
              <td><custom:write property="area3" name="onerow"  nbsp="true"/></td>
              <td><custom:write property="contactcode3" name="onerow"  nbsp="true"/></td>
              <td><custom:write property="contactname3" name="onerow"  nbsp="true"/></td> 
              <td><custom:write property="isbale3" name="onerow"  nbsp="true"/></td>
               
              <td><custom:write property="area4" name="onerow"  nbsp="true"/></td>           
              <td><custom:write property="contactcode4" name="onerow"  nbsp="true"/></td>
              <td><custom:write property="contactname4" name="onerow"  nbsp="true"/></td>
              <td><custom:write property="isbale4" name="onerow"  nbsp="true"/></td>
              
              <td><custom:write property="area5" name="onerow"  nbsp="true"/></td>
              <td><custom:write property="contactcode5" name="onerow"  nbsp="true"/></td>
              <td><custom:write property="contactname5" name="onerow"  nbsp="true"/></td>
              <td><custom:write property="isbale5" name="onerow"  nbsp="true"/></td>
              
              <td><custom:write property="area6" name="onerow"  nbsp="true"/></td>
              <td><custom:write property="contactcode6" name="onerow"  nbsp="true"/></td>
              <td><custom:write property="contactname6" name="onerow"  nbsp="true"/></td>
              <td><custom:write property="isbale6" name="onerow"  nbsp="true"/></td>
              
              <td><custom:write property="area7" name="onerow"  nbsp="true"/></td>
              <td><custom:write property="contactcode7" name="onerow"  nbsp="true"/></td>
              <td><custom:write property="contactname7" name="onerow"  nbsp="true"/></td> 
              <td><custom:write property="isbale7" name="onerow"  nbsp="true"/></td>
              
              <td><custom:write property="area8" name="onerow"  nbsp="true"/></td>           
              <td><custom:write property="contactcode8" name="onerow"  nbsp="true"/></td>
              <td><custom:write property="contactname8" name="onerow"  nbsp="true"/></td>
              <td><custom:write property="isbale8" name="onerow"  nbsp="true"/></td>
              
              <td><custom:write property="area9" name="onerow"  nbsp="true"/></td>
              <td><custom:write property="contactcode9" name="onerow"  nbsp="true"/></td>
              <td><custom:write property="contactname9" name="onerow"  nbsp="true"/></td>
              <td><custom:write property="isbale9" name="onerow"  nbsp="true"/></td>
              
              <td><custom:write property="area10" name="onerow"  nbsp="true"/></td>
              <td><custom:write property="contactcode10" name="onerow"  nbsp="true"/></td>
              <td><custom:write property="contactname10" name="onerow"  nbsp="true"/></td>
              <td><custom:write property="isbale10" name="onerow"  nbsp="true"/></td>
              
              <td><custom:write property="area11" name="onerow"  nbsp="true"/></td>
              <td><custom:write property="contactcode11" name="onerow"  nbsp="true"/></td>
              <td><custom:write property="contactname11" name="onerow"  nbsp="true"/></td>
              <td><custom:write property="isbale11" name="onerow"  nbsp="true"/></td>
              
              <td><custom:write property="area12" name="onerow"  nbsp="true"/></td>
              <td><custom:write property="contactcode12" name="onerow"  nbsp="true"/></td>
              <td><custom:write property="contactname12" name="onerow"  nbsp="true"/></td>
              <td><custom:write property="isbale12" name="onerow"  nbsp="true"/></td>
              
              <td><custom:write property="area13" name="onerow"  nbsp="true"/></td>
              <td><custom:write property="contactcode13" name="onerow"  nbsp="true"/></td>
              <td><custom:write property="contactname13" name="onerow"  nbsp="true"/></td> 
              <td><custom:write property="isbale13" name="onerow"  nbsp="true"/></td>
               
              <td><custom:write property="area14" name="onerow"  nbsp="true"/></td>           
              <td><custom:write property="contactcode14" name="onerow"  nbsp="true"/></td>
              <td><custom:write property="contactname14" name="onerow"  nbsp="true"/></td>
              <td><custom:write property="isbale14" name="onerow"  nbsp="true"/></td>
              
              <td><custom:write property="area15" name="onerow"  nbsp="true"/></td>
              <td><custom:write property="contactcode15" name="onerow"  nbsp="true"/></td>
              <td><custom:write property="contactname15" name="onerow"  nbsp="true"/></td>
              <td><custom:write property="isbale15" name="onerow"  nbsp="true"/></td>
              
              <td><custom:write property="area16" name="onerow"  nbsp="true"/></td>
              <td><custom:write property="contactcode16" name="onerow"  nbsp="true"/></td>
              <td><custom:write property="contactname16" name="onerow"  nbsp="true"/></td>
              <td><custom:write property="isbale16" name="onerow"  nbsp="true"/></td>
              
              <td><custom:write property="area17" name="onerow"  nbsp="true"/></td>
              <td><custom:write property="contactcode17" name="onerow"  nbsp="true"/></td>
              <td><custom:write property="contactname17" name="onerow"  nbsp="true"/></td> 
              <td><custom:write property="isbale17" name="onerow"  nbsp="true"/></td>
              
              <td><custom:write property="area18" name="onerow"  nbsp="true"/></td>           
              <td><custom:write property="contactcode18" name="onerow"  nbsp="true"/></td>
              <td><custom:write property="contactname18" name="onerow"  nbsp="true"/></td>
              <td><custom:write property="isbale18" name="onerow"  nbsp="true"/></td>
              
              <td><custom:write property="area19" name="onerow"  nbsp="true"/></td>
              <td><custom:write property="contactcode19" name="onerow"  nbsp="true"/></td>
              <td><custom:write property="contactname19" name="onerow"  nbsp="true"/></td>
              <td><custom:write property="isbale19" name="onerow"  nbsp="true"/></td>
              
              <td><custom:write property="area20" name="onerow"  nbsp="true"/></td>
              <td><custom:write property="contactcode20" name="onerow"  nbsp="true"/></td>
              <td><custom:write property="contactname20" name="onerow"  nbsp="true"/></td>
              <td><custom:write property="isbale20" name="onerow"  nbsp="true"/></td>
              
              
              <td><custom:write property="errormassage" name="onerow" nbsp="true"/></td><custom:hidden property="errormassage" name="onerow" changedName="msg" colIndex="<%=idx%>"/>
            </tr>

            </logic:iterate>
</span>
			<tr>
				<td colspan="140" align="left"><%= label.getLabelName("L_TotalData") + label.getLabelName("L_Colon") %><custom:write property="count" name="count" nbsp="true"/></td>
			</tr>
            <%@ include file="/inc/SummaryActionUP.inc" %>

          </table>
</div>
          <table width="100%" cellspacing="0" cellpadding="0">
            <tr><td  class="summary_top"></td></tr>
            <tr>
              <td class="td_center">
              
             
	      			<%if (totalsummary.size() > 0){ 
	      				
	      				//System.out.println(totalsummary.size());
	      				if(checkflag == null){
				%>
				                <a onclick="page_check();"><custom:button type="1" label="L_CheckContent" imgsrc="new.gif" border="0" style="width:60"/></a>
				<%}else if(("Y").equals(checkflag)){ %> 
				          	    <a onclick="javascript:page_print();"><custom:button type="1" label="L_Execcd" imgsrc="new.gif" border="0" style="width:60"/></a>				           
				                <a onclick="javascript:page_confirm();"><custom:button type="1" label="L_Submit1" imgsrc="new.gif" border="0" style="width:60" /></a><!-- privilegeCode="MA-D100" -->
                                <a onclick="javascript:page_giveup();"><custom:button type="1" label="L_GiveUp" imgsrc="new.gif" border="0" style="width:60"/></a>
                      <!-- <a onclick="javascript:page_submit();"><custom:button type="1" label="L_Submit_batch" imgsrc="new.gif" border="0" style="width:60"/></a>  	 -->			             
    	<%}}%> 
				
			
              </td>
            </tr>
          </table>
        </td>
      </tr>
    </table>
</form>
</body>
<script type="text/javascript">
/*
if(cform.uploadorgids.length!=undefined){
   for(var i=0;i<cform.uploadorgids.length;i++){

	if(eval('cform.msg'+i).value != ""){

		cform.uploadorgids[i].disabled=true;
	}
	
  }
} 
else {  
	if(eval('cform.msg0').value != ""){

		cform.uploadorgids.disabled=true;
	}
	
}*/</script>
</html>